<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2016-2017 Steinar Bang                                                -->
<!--                                                                                 -->
<!-- Licensed under the Apache License, Version 2.0 (the "License");                 -->
<!-- you may not use this file except in compliance with the License.                -->
<!-- You may obtain a copy of the License at                                         -->
<!--   http://www.apache.org/licenses/LICENSE-2.0                                    -->
<!-- Unless required by applicable law or agreed to in writing,                      -->
<!-- software distributed under the License is distributed on an "AS IS" BASIS,      -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.        -->
<!-- See the License for the specific language governing permissions and limitations -->
<!-- under the License.                                                              -->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xml:space="preserve">

    <modelVersion>4.0.0</modelVersion>
    <groupId>no.priv.bang.ukelonn</groupId>
    <artifactId>parent</artifactId>
    <version>1.0.0-SNAPSHOT</version>

    <packaging>pom</packaging>

    <name>ukelonn parent project</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.bundle.plugin.version>2.5.3</maven.bundle.plugin.version>
        <karaf.version>4.1.2</karaf.version>
        <liquibase.version>3.5.3</liquibase.version>
        <liquibase-slf4j.version>2.0.0</liquibase-slf4j.version>
        <snakeyaml.version>1.17</snakeyaml.version>
        <derby.version>10.11.1.1</derby.version>
        <postgresql.version>9.4.1211.jre7</postgresql.version>
        <dependency.osgi.version>6.0.0</dependency.osgi.version>
        <osgi.service.version>1.3.0</osgi.service.version>
        <dependency.osgi.log.version>1.3.0</dependency.osgi.log.version>
        <dependency.osgi.jdbc.version>1.0.0</dependency.osgi.jdbc.version>
        <dependency.pax.web.version>6.0.3</dependency.pax.web.version>
        <dependency.pax.exam.version>4.10.0</dependency.pax.exam.version>
        <dependency.pax.shiro.version>0.1.0</dependency.pax.shiro.version>
        <dependency.pax.jdbc.version>1.0.1</dependency.pax.jdbc.version>
        <dependency.shiro.version>1.3.1</dependency.shiro.version>
        <dependency.myfaces.version>2.2.6</dependency.myfaces.version>
        <javax.validation>1.1.0.Final</javax.validation>
        <primefaces.version>6.0</primefaces.version>
        <rest-maven-plugin-version>0.1.4</rest-maven-plugin-version>
        <ukelonn-server-url>http://localhost:8181</ukelonn-server-url>
        <ukelonn-server-basic-auth-token>a2FyYWY6a2FyYWY=</ukelonn-server-basic-auth-token>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.9.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.10.19</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>${dependency.osgi.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.service.component.annotations</artifactId>
                <version>${osgi.service.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.service.log</artifactId>
                <version>${dependency.osgi.log.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.service.jdbc</artifactId>
                <version>${dependency.osgi.jdbc.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.web</groupId>
                <artifactId>pax-web-api</artifactId>
                <version>${dependency.pax.web.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.web</groupId>
                <artifactId>pax-web-jsp</artifactId>
                <version>${dependency.pax.web.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.karaf.shell</groupId>
                <artifactId>org.apache.karaf.shell.console</artifactId>
                <version>${karaf.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-container-karaf</artifactId>
                <version>${dependency.pax.exam.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.karaf</groupId>
                <artifactId>apache-karaf-minimal</artifactId>
                <version>${karaf.version}</version>
                <type>zip</type>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.karaf.features</groupId>
                <artifactId>standard</artifactId>
                <version>${karaf.version}</version>
                <type>xml</type>
                <classifier>features</classifier>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-junit4</artifactId>
                <version>${dependency.pax.exam.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-link-mvn</artifactId>
                <version>${dependency.pax.exam.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.url</groupId>
                <artifactId>pax-url-reference</artifactId>
                <version>${dependency.pax.url.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${javax.validation}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-api</artifactId>
                <version>${dependency.myfaces.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-impl</artifactId>
                <version>${dependency.myfaces.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>${primefaces.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.jdbc</groupId>
                <artifactId>pax-jdbc</artifactId>
                <version>${dependency.pax.jdbc.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.jdbc</groupId>
                <artifactId>pax-jdbc-derby</artifactId>
                <version>${dependency.pax.jdbc.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derby</artifactId>
                <version>${derby.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.shiro</groupId>
                <artifactId>pax-shiro-faces</artifactId>
                <version>${dependency.pax.shiro.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-core</artifactId>
                <version>${dependency.shiro.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-web</artifactId>
                <version>${dependency.shiro.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mattbertolini</groupId>
                <artifactId>liquibase-slf4j</artifactId>
                <version>${liquibase-slf4j.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-core</artifactId>
                <version>${liquibase.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgresql.version}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven.bundle.plugin.version}</version>
                    <configuration>
                        <instructions>
                            <!-- Enable processing of OSGI DS component annotations -->
                            <_dsannotations>*</_dsannotations>
                            <!-- Enable processing of OSGI metatype annotations -->
                            <_metatypeannotations>*</_metatypeannotations>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>.</directory>
                                <includes>
                                    <include>**/*.log</include>
                                </includes>
                                <followSymlinks>false</followSymlinks>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20</version>
                </plugin>
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>4.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.karaf.tooling</groupId>
                    <artifactId>karaf-maven-plugin</artifactId>
                    <version>${karaf.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <startLevel>80</startLevel>
                        <includeTransitiveDependency>false</includeTransitiveDependency>
                        <aggregateFeatures>false</aggregateFeatures>
                        <includeProjectArtifact>true</includeProjectArtifact>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-features-file</id>
                            <phase>package</phase>
                            <goals>
                                <goal>features-generate-descriptor</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.cjnygard</groupId>
                    <artifactId>rest-maven-plugin</artifactId>
                    <version>${rest-maven-plugin-version}</version>
                    <configuration>
                        <endpoint>${ukelonn-server-url}</endpoint>
                        <requestType>
                            <type>application</type>
                            <subtype>x-www-form-urlencoded</subtype>
                        </requestType>
                        <headers>
                            <Authorization>Basic ${ukelonn-server-basic-auth-token}</Authorization>
                        </headers>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.cjnygard</groupId>
                            <artifactId>rest-maven-plugin</artifactId>
                            <version>${rest-maven-plugin-version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>ru.yaal.maven</groupId>
                                        <artifactId>write-text-files-maven-plugin</artifactId>
                                        <versionRange>[1.1,)</versionRange>
                                        <goals>
                                            <goal>
                                                write-text-files
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>${maven.bundle.plugin.version}</version>
                        <type>maven-plugin</type>
                    </dependency>
                </dependencies>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <show>private</show>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <outputDirectory>${basedir}/target</outputDirectory>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <configuration>
                    <coberturaReports>
                        <coberturaReport>${basedir}/target/coverage.xml</coberturaReport>
                    </coberturaReports>
                </configuration>
            </plugin>
            <plugin>
                <groupId>ru.yaal.maven</groupId>
                <artifactId>write-text-files-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>generate-rest-post-arguments</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>write-text-files</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <files>
                        <file>
                            <path>target/karaf-console-rest-post-update-arguments</path>
                            <lines>
                                <line>action=update&amp;dummy=dummy</line>
                            </lines>
                        </file>
                    </files>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>ukelonn.api</module>
        <module>ukelonn.bundle</module>
        <module>ukelonn.tests</module>
        <module>ukelonn.bundle.db.liquibase</module>
        <module>ukelonn.bundle.db.test</module>
        <module>ukelonn.bundle.db.postgresql</module>
        <module>karaf</module>
    </modules>

</project>
